package com.liy.cloud.base.entity;

import com.das.framework.common.vo.BaseVO;
import org.apache.ibatis.annotations.Insert;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.Size;
import java.io.Serializable;

/**
 * @Auther: libs
 * @Date: 2018/6/27 19:40
 * @Description: 部件种类-部件关联类
 */
public class BaseTypePartEntity extends BaseVO<String> implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     @NotEmpty 验证字符串不为null或者不为空
     @NotBlank 验证字符串不为null或者trim()后不为空
     */

    @NotBlank(message="{common.validation.notnull}", groups= {Insert.class})
    @Size(min=1, max=10, message="{common.validation.length}")
    private String typeId;

    @NotBlank(message="{common.validation.notnull}", groups= {Insert.class})
    @Size(min=1, max=10, message="{common.validation.length}")
    private String partId;

    @Size(max=40, message="{common.validation.length}")
    private String coordinate;

    @NotBlank(message="{common.validation.notnull}", groups= {Insert.class})
    @Size(min=1, max=2, message="{common.validation.length}")
    private String sno;

    public String getTypeId() {
        return typeId;
    }

    public void setTypeId(String typeId) {
        this.typeId = typeId;
    }

    public String getPartId() {
        return partId;
    }

    public void setPartId(String partId) {
        this.partId = partId;
    }

    public String getCoordinate() {
        return coordinate;
    }

    public void setCoordinate(String coordinate) {
        this.coordinate = coordinate;
    }

    public String getSno() {
        return sno;
    }

    public void setSno(String sno) {
        this.sno = sno;
    }
}
